import xlrd


class ExlOperation:
    def __init__(self,path = ''):
        with xlrd.open_workbook(path) as workbook:
            self.workbook = workbook

    def get_sheet(self,sheet_name):
        self.sheet_page = self.workbook.sheet_by_name(sheet_name)
        return self.sheet_page

    def get_rows(self):
        return self.sheet_page.nrows()

    def get_cols(self):
        return self.sheet_page.ncols

    def get_cell_value(self,row,col):
        return self.sheet_page.cell_value(row,col)